package com.province.platform.core.collector;

import com.province.platform.common.utils.Configuration;
import com.province.platform.core.communication.Communication;
import com.province.platform.core.communication.TaskGroupCommunicationManager;
import com.province.platform.core.constants.CoreConstants;

import java.util.List;

public abstract class AbstractCollector {

    public void registerTasKGroupCommunication(List<Configuration> taskGroupConfigurationList) {
        for (Configuration configuration: taskGroupConfigurationList) {
            int taskGroupId = configuration.getInt(CoreConstants.CORE_CONTAINER_TASK_GROUP_ID);
            TaskGroupCommunicationManager.registerTaskGroupCommunication(taskGroupId, new Communication());
        }
    }
}
